import { Navigate, useRoutes } from "react-router-dom";
import Login from "@/views/login";
import lazyLoad from "./utils/lazyLoad";
import React from 'react'
const rootRouter = [
    {
        path: '/',
        element: <Navigate to="/login" />
    },
    {
        path: '/login',
        element: lazyLoad(React.lazy(() => import('@/views/login'))),
        meta: {
            title: '登录',
            key: 'login',
            requireAuth: false
        }
    }
]

const Router = () => {
    const routes = useRoutes(rootRouter)
    return routes

}

export default Router